import request from '@/utils/request'

// 查询出资人现金流列表
export function listLpCashflow(query) {
  return request({
    url: '/cashflow/lpCashflow/list',
    method: 'get',
    params: query
  })
}

// 查询出资人现金流列表合计
export function getLpCashflowSum(query) {
  return request({
    url: '/cashflow/lpCashflow/getSum',
    method: 'get',
    params: query
  })
}

// 查询出资人现金流列表
export function getLpCashflowIrr(query) {
  return request({
    url: '/cashflow/lpCashflow/irr/calc',
    method: 'get',
    params: query
  })
}

// 查询出资人现金流详细
export function getLpCashflow(id) {
  return request({
    url: '/cashflow/lpCashflow/' + id,
    method: 'get'
  })
}

// 保存出资人现金流
export function saveLpCashflow(data) {
  return request({
    url: '/cashflow/lpCashflow/save',
    method: 'post',
    data: data
  })
}

// 删除出资人现金流
export function delLpCashflow(id) {
  return request({
    url: '/cashflow/lpCashflow/' + id,
    method: 'delete'
  })
}

// 导出出资人现金流
export function exportLpCashflow(query) {
  return request({
    url: '/cashflow/lpCashflow/export',
    method: 'get',
    params: query
  })
}
// 查询现金流信息返回给Chart组件使用
export function lpCashFlowCharts(params) {
  return request({
    url: '/cashflow/lpCashflow/cashFlowCharts',
    method: 'get',
    params: params
  })
}

export function getCashFlowCombined(fundId) {
  return request({
    url: '/cashflow/lpCashflow/getCashFlowCombined/' + fundId,
    method: 'get'
  })
}
